/**
 * 
 */
package com.wolfware.athsweb.manager.impl;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.wolfware.athsweb.domain.Country;
import com.wolfware.athsweb.manager.CountryManager;
import com.wolfware.athsweb.persistancy.dao.CountryDAO;

/**
 * @author Christian Strzadala
 * 
 * Uses Spring Transactional Annotation in class as not to tie the interface to Spring
 *
 */
@Transactional(
		propagation = Propagation.REQUIRED,
	    isolation = Isolation.DEFAULT,
	    
	    rollbackFor = {
				Exception.class
		}
)
public class CountryManagerImpl implements CountryManager {

	private CountryDAO countryDAO;
	
	/**
	 * @param countryDAO the countryDAO to set
	 */
	public void setCountryDAO(final CountryDAO countryDAO) {
		this.countryDAO = countryDAO;
	}
	
	/**
	 * {@inheritDoc}
	 */
	public void addCountry(Country country) {
		countryDAO.saveCountryEntry(country);
	}

}
